#ifndef JOINTUNIT_H
#define JOINTUNIT_H

typedef enum
{
    MOT_SLD_JOINT = 0,
    MOT_SLD_ZN_FEED,
    MOT_SLD_COUNT
}EnMOTINDEX;

#define CNTOFMOTOR_JOINT (MOT_SLD_COUNT)

typedef enum
{
    S_SLD_IDLE = 0,
    S_SLD_HOMING,
    S_SLD_ON_BERTH,

    S_SLD_TOUCH_ING,
    S_SLD_TOUCH,
    S_SLD_FDING,
    S_SLD_DRAW,
    S_SLD_WETTING,
    S_SLD_CHECKPOSITION,
    S_SLD_RETURNING,
    S_SLD_BERTHING,

    S_SLD_FEEDING_ONCE,

	S_SLD_HMI_ONGOING,

} S_SOLDERING;

typedef struct
{
    enum TSKID TskID;
    u32 idxOfCarrier;
    S_SOLDERING mainState;
    u32 Homing_Cmd;
    u32 MotorIndex[CNTOFMOTOR_JOINT];
    EN_MOT_HOME SlaveStatus;
    u32 Msg_Send;
    u32 Msg_Rcv;
    MESSAGE msg_Tx;
    MOTION_PARAM *mot_param;
    u32 selfTestOk;
    u32 subState;

    u32 ticksForWetting;
} MAC_SOLDER;

extern MAC_SOLDER Mac_SolderingA;;
extern MAC_SOLDER Mac_SolderingB;

extern void Task_SolderA(void *p_arg);
extern void Task_SolderB(void *p_arg);
#endif


